xen-detect: Avoid dumping core
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 14 Dec 2009 11:58:45 +0000 (11:58 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 14 Dec 2009 11:58:45 +0000 (11:58 +0000)
commit420820e830a012939240db12c52a5d340a4298f1
treefe8db9e9313c58c65c0aa8958d71ad3ed938d590
parentbda0da7f26a50938a97db6865aa019e0ec42a6c8
xen-detect: Avoid dumping core

F12 introduces a tool to automatically report bugs when there are core
dumps.  Since xen-detect relies on fork+waitpid in order to trap a
SIGILL from a child, every time someone runs xen-detect on a bare
metal kernel a bug is reported into Red Hat's Bugzilla. :-)

However, even without this contingent need, leaving core dumps around
is not nice.  So this patch just traps SIGILL using
signal/sentjmp/longjmp, without the need to fork.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/misc/xen-detect.c